/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package modeles;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Query;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;


@Entity(name="Acteur")
public class Acteur implements Serializable {
     @ManyToMany(mappedBy="acteurs")
    
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    private String nom;
    private String prenom;
    private String description;
  
    public Acteur() {
    }

    public Acteur(String nom,String prenom, String description) {
        this.nom = nom;
        this.prenom = prenom;
        this.description = description;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public String getNom() {
        return nom;
    }

      public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

     public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

      public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
//
//    public Collection<Disque> getFilms() {
//        return films;
//    }
//
//    public void setFilms(Collection<Disque> films) {
//        this.films = films;
//    }

  
    @Override
    public String toString() {
        return "modeles.Acteur[id=" + id + "]";
    }

}
